package com.hanggold.jfinal.springframework.bean;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.EnvironmentAware;

/**
 * @author <a href="mailto:sunmch@163.com">smc</a>
 * @date 2019-09-29 14:17
 * @since 1.0.0
 **/
//@Component
public class User {

    @Autowired
    private EnvironmentAware environmentAware;

    @Autowired
    private ApplicationContext applicationContext;


    private Car car;

    private Tool tool;

    public Car getCar() {
        return car;
    }

    public void setCar(Car car) {
        this.car = car;
    }

    public Tool getTool() {
        return tool;
    }

    public void setTool(Tool tool) {
        this.tool = tool;
    }

    public void say(String content) {
        System.out.printf("you say %s \n", content);
    }


    public void tool(String content) {
        tool.name(content);
    }

    public void car(String content) {
        car.name(content);
    }
}
